<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="/common/meta.jsp" %>
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>至好客户关系管理系统----SoGoodSoft.com</title>

<link href="themes/default/style.css" rel="stylesheet" type="text/css" />
<link href="themes/css/core.css" rel="stylesheet" type="text/css" />
<link href="uploadify/css/uploadify.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<link href="themes/css/ieHack.css" rel="stylesheet" type="text/css" />
<![endif]-->

<script src="javascripts/speedup.js" type="text/javascript"></script>
<script src="javascripts/jquery-1.4.4.js" type="text/javascript"></script>
<script src="javascripts/jquery.cookie.js" type="text/javascript"></script>
<script src="javascripts/jquery.validate.js" type="text/javascript"></script>
<script src="javascripts/dwz.regional.zh.js" type="text/javascript"></script>
<script src="javascripts/jquery.bgiframe.js" type="text/javascript"></script>
<script src="xheditor/xheditor-zh-cn.min.js" type="text/javascript"></script>
<script src="uploadify/scripts/swfobject.js" type="text/javascript"></script>
<script src="uploadify/scripts/jquery.uploadify.v2.1.0.js" type="text/javascript"></script>
<script src="bin/dwz.min.js" type="text/javascript"></script>
<script src="javascripts/sogoodsoft.js" type="text/javascript"></script>
<script type="text/javascript" type="text/javascript" src="plugin/My97DatePicker/WdatePicker.js"></script>
<!-- 附件JS -->
<script src="plugin/fileupload/jquery.MultiFile.js" type="text/javascript"></script>
<script src="plugin/fileupload/jquery.form.js" type="text/javascript" ></script>
<!-- 附件JS -->

<!-- FusionCharts -->
<script type="text/javascript" src="javascripts/FusionCharts/Charts/FusionCharts.js"></script>


<script type="text/javascript">
$(function(){
	DWZ.init("dwz.frag.xml", {
//		loginUrl:"loginsub.html", loginTitle:"登录",	// 弹出登录对话框
		loginUrl:"login.html",	// 跳到登录页面
		debug:false,	// 调试模式 【true|false】
		callback:function(){
			initEnv();
			$("#themeList").theme({themeBase:"themes"});
		}
	});
});
//清理浏览器内存,只对IE起效,FF不需要
if ($.browser.msie) {
	window.setInterval("CollectGarbage();", 10000);
}
</script>
<script type="text/javascript">
/**
 *登录提示 
 */

function loginAlert(){
	var action = ctx+"/crm/alert!loginAlert.action";
	$.getJSON(action,function(json){
		for(var i=0;i<json.length;i++){
			var action = ctx+"/crm/alert!AlertContent.action?id="+json[i].id;
			$.pdialog.open(action, "loginAlert"+i, "系统提示："+json[i].topic,{width: 700, height: 450});
			}
		
		});
	
}

/**
 *系统按时提示 
 */


function sysAlert(){
	var action = ctx+"/crm/alert!sysAlert.action";
	$.getJSON(action,function(sysalerttask){
		if(typeof(sysalerttask)=="undefined"||sysalerttask.length==0){
			return ;
			}
		for(var i=0;i<sysalerttask.length;i++){
			var action = ctx+"/crm/alert!AlertContent.action?id="+sysalerttask[i].id;
			var now = new Date();
			if(sysalerttask[i].alerttime<=now.getTime()){
				$.pdialog.open(action, "sysAlert"+i, "系统提示："+sysalerttask[i].topic,{width: 700, height: 450});
			}
			
			}
		});
}
function homepage(){
	var url = ctx+"/crm/companyinfo!ajax.action";
	$.getJSON(url,function(json){
		$("#weekwork").val(json.notice);
		$("#otherinfo").after(json.other);
		});
}
$(document).ready(function(){
	loginAlert();
	window.setInterval(sysAlert,30000);
	var dt = new Date();
	var year = dt.getYear();
	var mth = dt.getMonth()+1;
	var day = dt.getDate();
	var week = dt.getDay();
	if(week==0)week = "日";
	if(week==1)week = "一";
	if(week==2)week = "二";
	if(week==3)week = "三";
	if(week==4)week = "四";
	if(week==5)week = "五";
	if(week==6)week = "六";
	$("#mainPageDate").html("今天是"+year+"年"+mth+"月"+day+"日");
	$("#mainPageWeek").html("星 期 "+week);
	 homepage();
});
</script>
</head>

<body scroll="no">
	<div id="layout">
		<div id="header">
			<div class="headerNav">
				<a class="logo" href="#">标志</a>
				<ul class="nav">
					<li><a href="javascript:void(0);" >${root } ${currUser.organization.name } ${currUser.name }</a></li>
					<li><a href="${ctx }/account/profile!input.action" target="dialog">个人信息</a></li>
					<!--<li><a href="#">反馈</a></li>-->
					<li><a href="doc/dwz-user-guide.pdf">帮助</a></li>
					<li><a href="${ctx}/j_spring_security_logout">退出</a></li>
				</ul>
				<ul class="themeList" id="themeList">
					<li class="t1" theme="default"><div class="selected">蓝色</div></li>
					<li class="t2" theme="green"><div>绿色</div></li>
					<!--
					<li class="t3" theme="red"><div>红色</div></li>
					<li class="t4" theme="purple"><div>紫色</div></li>
					-->
					<li class="t5" theme="silver"><div>银色</div></li>

				</ul>
			</div>
		</div>
		<div id="leftside">
		<div id="sidebar_s" style="display:none;">
			<div class="collapse">
				<div class="toggleCollapse"><div></div></div>
			</div>
		</div>
		<div id="sidebar">
			<div class="toggleCollapse"><h2>主菜单</h2><div>收缩</div></div>
			<div class="accordion">
				
				<div class="accordionHeader">
					<h2><span>Folder</span>系统管理</h2>
				</div>
				<div class="accordionContent">
					<ul class="tree treeFolder">
					<security:authorize ifAllGranted="ROLE_系统管理">
					<security:authorize ifAllGranted="ROLE_用户管理">
						<li><a href="${ctx }/account/user.action" target="navTab" rel="userList" title="用户管理">用户管理</a></li>
						
						</security:authorize>
					<security:authorize ifAllGranted="ROLE_主页设置">
						<li><a href="${ctx }/crm/companyinfo!input.action?id=1" target="navTab" rel="alertList">主页设置</a></li>
					</security:authorize>
					<security:authorize ifAllGranted="ROLE_角色管理">
						<li><a href="${ctx }/account/role.action" target="navTab" rel="roleList">角色管理</a></li>
						</security:authorize>
					<security:authorize ifAllGranted="ROLE_权限管理">
						<li><a href="${ctx }/account/authority.action" target="navTab" rel="authList" title="权限管理">权限管理</a></li>
					</security:authorize>
					<security:authorize ifAllGranted="ROLE_组织结构管理">
						<li><a href="${ctx }/common/organization-ui!getAllOrgUL.action" target="navTab" rel="orgList" title="组织结构管理">组织结构管理</a></li>
					</security:authorize>
					<security:authorize ifAllGranted="ROLE_分类及类型">
						<li><a href="${ctx }/common/sys-type-ui!getAllSysClassUL.action" target="navTab" rel="codeList" title="分类及类型">分类及类型</a></li>
					</security:authorize>
					<security:authorize ifAllGranted="ROLE_备份数据库">
						<li><a href="${ctx }/sys/backdb!input.action" target="navTab" rel="backDB" title="备份数据库">备份数据库</a></li>
					</security:authorize>
					</security:authorize>
					</ul>
				</div>
				
				
				<div class="accordionHeader">
					<h2><span>Folder</span>日程提醒</h2>
				</div>
				<div class="accordionContent">
					<ul class="tree treeFolder">
					<security:authorize ifAllGranted="ROLE_日程提醒">
						<li><a href="${ctx }/crm/alert!input.action" target="navTab" rel="alertAdd">添加日程</a></li>
						<li><a href="${ctx }/crm/alert.action" target="navTab" rel="alertList">日程管理</a></li>
					</security:authorize>
					</ul>
				</div>
				
				
				<div class="accordionHeader">
					<h2><span>Folder</span>客户管理</h2>
				</div>
				
				<div class="accordionContent">
					<ul class="tree">
					<security:authorize ifAllGranted="ROLE_客户管理">
					<security:authorize ifAllGranted="ROLE_客户信息添加">
						<li><a class="add" href="${ctx }/crm/customer!input.action" target="navTab">添加客户信息</a></li>
					</security:authorize>
					<security:authorize ifAllGranted="ROLE_客户信息管理">
						<li><a href="${ctx}/crm/customer.action" target="navTab" rel="customerList" >客户信息管理</a></li>	
					</security:authorize>
					<security:authorize ifAllGranted="ROLE_拜访客户管理">					
						<li><a href="${ctx }/crm/visit.action" target="navTab" rel="visitList">拜访信息管理</a></li>		
					</security:authorize>		
					<li><a href="${ctx }/crm/customer!myCustomer.action" target="navTab" rel="visitList">我的客户</a></li>	
					<li><a href="${ctx }/crm/visit!myDate.action" target="navTab" rel="visitList">今日预约</a></li>	
					<li><a href="${ctx }/crm/visit!myVisit.action" target="navTab" rel="visitList">我的拜访</a></li>	
					<security:authorize ifAllGranted="ROLE_拜访量对比">					
						<li><a href="${ctx }/crm/report/visit-per-man-monthly!compare.action?org=${currUser.organization.id}" target="navTab" rel="visitList">拜访量对比</a></li>		
					</security:authorize>	
					</security:authorize>		
					</ul>
				</div>
		
				
				<div class="accordionHeader">
					<h2><span>Folder</span>订单管理</h2>
				</div>
				<div class="accordionContent">
					<ul class="tree">
					<security:authorize ifAllGranted="ROLE_订单管理">
					<security:authorize ifAllGranted="ROLE_新增订单">
						<li><a class="add" href="${ctx}/crm/order!input.action" target="navTab" rel="orderAdd" >添加订单</a></li>
					</security:authorize>
					<security:authorize ifAllGranted="ROLE_订单列表">
						<li><a  href="${ctx }/crm/order.action" target="navTab" rel="orderList">管理订单</a></li>
					</security:authorize>
					<li><a  href="${ctx }/crm/order!myOrder.action" target="navTab" rel="orderList">我的订单</a></li>
					<security:authorize ifAllGranted="ROLE_收款确认">
						<li><a class="add" href="${ctx }/crm/order-confirm.action" target="navTab" rel="orderConfirmList">收款确认</a></li>
					</security:authorize>
					</security:authorize>
					</ul>
				</div>
				
				
				
				<div class="accordionHeader">
					<h2><span>Folder</span>短信群发</h2>
				</div>
				<div class="accordionContent">
					<ul class="tree">
						<security:authorize ifAllGranted="ROLE_短信群发">
						<security:authorize ifAllGranted="ROLE_短信管理">
						<li><a href="${ctx }/crm/smstask!input.action"" target="navTab" rel="smstaskAdd">发送短信</a></li>
						</security:authorize>
						<security:authorize ifAllGranted="ROLE_短信管理">
						<li><a href="${ctx }/crm/smstask.action" target="navTab" rel="smstaskList">短信管理</a></li>
						</security:authorize>
						<security:authorize ifAllGranted="ROLE_短信记录">
						<li><a href="${ctx }/crm/sms.action" target="navTab" rel="smsList">短信记录</a></li>		
						</security:authorize>		
						<security:authorize ifAllGranted="ROLE_短信模板">			
						<li><a href="${ctx }/crm/smstemplate.action" target="navTab" rel="smstemplateList">短信模板</a></li>
						</security:authorize>
						</security:authorize>
					</ul>
				</div>
				
				
				<div class="accordionHeader">
					<h2><span>Folder</span>统计分析</h2>
				</div>
				
				<div class="accordionContent">
					<ul class="tree">
					<security:authorize ifAllGranted="ROLE_统计分析">
                              <li><a href="${ctx }/crm/report/goods-cate-year.action"  target="navTab" rel="GoodsCateYear" >产品销量分类统计</a></li>
                              <li><a href="${ctx }/crm/report/total-cash-monthly.action"  target="navTab" rel="SalesMonth" >总销售额月报</a></li>
                               <li><a href="${ctx }/crm/report/order-per-man.action"  target="navTab" rel="orderPerMan" >有效订单统计</a></li>
                              <li><a href="${ctx }/crm/report/visit-per-man-monthly.action"  target="navTab" rel="visitCount" title="回访数对比">回访量对比</a></li>
                              <li><a href="${ctx }/crm/report/goods-per-man-monthly.action"  target="navTab" rel="userSalesCount" >业务员产品销量对比</a></li>
                              <li><a href="report.html"  target="navTab" rel="userSalesCount" title="按需制定报表">定制报表</a></li>
                     </security:authorize>
					</ul>
				</div>
				
				
				<div class="accordionHeader">
					<h2><span>Folder</span>文档管理</h2>
				</div>
				<div class="accordionContent">
					<ul class="tree">
					<security:authorize ifAllGranted="ROLE_文档管理">
					<security:authorize ifAllGranted="ROLE_文档添加">
						<li><a href="${ctx}/crm/document!input.action" target="navTab" rel="addDoc">添加文档</a></li>
					</security:authorize>
					<security:authorize ifAllGranted="ROLE_文档列表">
						<li><a href="${ctx}/crm/document.action" target="navTab" rel="docList">文档列表</a></li>
					</security:authorize>
					<security:authorize ifAllGranted="ROLE_文档查看">
						<li><a href="${ctx}/crm/document!view.action" target="navTab" rel="docView">文档查看</a></li>
					</security:authorize>
				</security:authorize>
					</ul>
				</div>
			
				
				<div class="accordionHeader">
					<h2><span>Folder</span>产品管理</h2>
				</div>
				<div class="accordionContent">
					<ul class="tree">
					<security:authorize ifAllGranted="ROLE_产品管理">
						<li><a href="${ctx }/crm/goods!input.action" target="navTab" rel="goodsAdd">添加产品</a></li>
						<security:authorize ifAllGranted="ROLE_产品列表">
						<li><a href="${ctx }/crm/goods.action" target="navTab" rel="goodsList">产品管理</a></li>
						</security:authorize>
						<security:authorize ifAllGranted="ROLE_产品分类">
						<li><a href="${ctx }/crm/goods-cate.action" target="navTab" rel="goodscateList">产品分类</a></li>
						</security:authorize>
							</security:authorize>
					</ul>
				</div>
			
				
			</div>
		</div>
		</div>
		<div id="container">
			<div id="navTab" class="tabsPage">
				<div class="tabsPageHeader">
					<div class="tabsPageHeaderContent"><!-- 显示左右控制时添加 class="tabsPageHeaderMargin" -->
						<ul class="navTab-tab">
							<li tabid="main" class="main"><a href="#"><span><span class="home_icon">我的主页</span></span></a></li>
						</ul>
					</div>
					<div class="tabsLeft">left</div><!-- 禁用只需要添加一个样式 class="tabsLeft tabsLeftDisabled" -->
					<div class="tabsRight">right</div><!-- 禁用只需要添加一个样式 class="tabsRight tabsRightDisabled" -->
					<div class="tabsMore">more</div>
				</div>
				<ul class="tabsMoreList">
					<li><a href="javascript:void(0)">我的主页</a></li>
				</ul>
				<div class="navTab-panel tabsPageContent">
					<div>
						<div class="accountInfo">
							<div class="alertInfo">
									<h2><a href="doc/dwz-user-guide.pdf" target="_blank">帮助文档(WORD)</a></h2>
								<a href="introduce.html"  target="dialog" width="700" height="500">系统特点</a>
							</div>
							<div class="right">
								<p id="mainPageDate">
								</p>
								<p id="mainPageWeek"></p>
							</div>
							<p><span>${root } </span></p>
							<p>${currUser.organization.name} ${currUser.name }</p>
						</div>
						<div class="pageFormContent">
							<p style="width:80%;height:230px;font-size:10pt;line-height:20px;">
							<textarea cols="100" rows="16" id="weekwork">本周工作安排：1、已下订单未收款的，抓紧时间收款。
							
	   2、节前部分紧缺商品已调价，与客户沟通时要好好解释一下。
	   
	   3、本周天气不好，交通出行不便，为防止迟到，请比平时稍早一点出门。
	   
	   4、周五的工作会议，因为史总出差，推迟到下周进行。
	   
	   5、系统短信功能仅用于工作沟通，请不要用于非工作用途。
	（有记录可查，经常给女朋友发的，请注意了，大家都看到了。）
	   
	   5、公司新上线的CRM系里有文档管理功能，以后公司所有电子版文档，统一由系统进行管理。
	      对于绝密文档，一定要选成“绝密”，防止不相当人员泄露公司机密。
							</textarea>
							
							
							</p>
							<div class="divider" id="otherinfo"></div>
						</div>

					</div>
				</div>
			</div>
		</div>
		<div id="taskbar" style="left:0px; display:none;">
			<div class="taskbarContent">
				<ul></ul>
			</div>
			<div class="taskbarLeft taskbarLeftDisabled" style="display:none;">taskbarLeft</div>
			<div class="taskbarRight" style="display:none;">taskbarRight</div>
		</div>
		<div id="splitBar"></div>
		<div id="splitBarProxy"></div>
	</div>
<!--拖动效果-->
	<div class="resizable"></div>
<!--阴影-->
	<div class="shadow" style="width:508px; top:148px; left:296px;">
		<div class="shadow_h">
			<div class="shadow_h_l"></div>
			<div class="shadow_h_r"></div>
			<div class="shadow_h_c"></div>
		</div>
		<div class="shadow_c">
			<div class="shadow_c_l" style="height:296px;"></div>
			<div class="shadow_c_r" style="height:296px;"></div>
			<div class="shadow_c_c" style="height:296px;"></div>
		</div>
		<div class="shadow_f">
			<div class="shadow_f_l"></div>
			<div class="shadow_f_r"></div>
			<div class="shadow_f_c"></div>
		</div>
	</div>

	<!--遮盖屏幕-->
	<div id="alertBackground" class="alertBackground"></div>

	<div id='background' class='background'></div>
	<div id='progressBar' class='progressBar'>数据加载中，请稍等...</div>
</body>
</html>